package com.sky.mapper;

import com.sky.entity.Category;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;

/**
 * CTassName: setmealDishMapper
 * Package: com.sky.mapper
 * Description:
 *  xw
 *  2023/11/18 16:49
 *  1.0
 */
@Mapper
public interface SetmealDishMapper {


    // 查询对应的菜品
    @Select("SELECT * FROM setmeal_dish WHERE setmeal_id = #{getId}")
    List<SetmealDish> getId(Long getId);

    // 查询菜品对应的套餐
    List<Long> getSetmealIdsByDishIds(String[] idArray);

    // 将对应菜品 id 添加到 （套餐，菜品）关联表中
    void insertBatch(List<SetmealDish> flavors);



    // 删除 （套餐，菜品）中间表对应的数据
    void delete(Long id);

}
